const low = require('lowdb')
const FileSync = require('lowdb/adapters/FileSync')

const dataBaseDir = 'E:/code/electron/dream/src/data/'

function getDB(jsonData: string) {
    return low(new FileSync(dataBaseDir + jsonData))
}

export const movieDB = getDB('movies.json')
export const hotDB =  getDB('hots.json')
export const accessRecordsDB = getDB('access_records.json')
